package com.leeon.container.iterator;

import typeinfo.pets.Pet;
import typeinfo.pets.Pets;

import java.util.Iterator;
import java.util.List;

import static net.mindview.util.Print.print;

public class SimpleIteration {

    public static void main(String[] args){
        List<Pet> pets = Pets.arrayList(12);

        Iterator<Pet> iterator = pets.iterator();

 /*       while (iterator.hasNext()){
            print(iterator.next().id());
        }*/

        while (iterator.hasNext()){
            iterator.next();
            iterator.remove();
        }

        print(pets);
    }

}
